package net.pimpas.report.processor.condition.impl;

import net.pimpas.report.processor.condition.ConditionType;
import net.pimpas.report.processor.exception.ConditionException;
import net.pimpas.report.processor.field.Field;
import net.pimpas.report.processor.resolver.FieldPropertyResolver;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;

public class NotBetweenCondition extends BetweenCondition {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2162247633019832322L;

	public NotBetweenCondition(Field field,Object value1, Object value2) {
		super(field, value1, value2);
		this.setType(ConditionType.NOT_BETWEEN);
	}
	
	@Override
	public Criterion process(String fieldAlias, FieldPropertyResolver resolver) throws ConditionException {
		return Restrictions.not(super.process(fieldAlias, resolver));
	}
}